import request from "@/utils/request";

// 发布工单
export function addWorkOrder(data) {
  return request({
    url: "/business/work/add",
    method: "post",
    data: data,
  });
}
// 查询历史工单
export function getHistoryWorkOrder(query) {
  return request({
    url: "/business/work/list",
    method: "GET",
    params: query,
  });
}
// 导出工单
export function exportWorkOrder(data) {
  return request({
    url: "/business/work/export",
    method: "post",
    data: data,
  });
}
// 获取工单详情
export function getWorkOrderDetail(query) {
  return request({
    url: "/business/work/getInfo/" + query,
    method: "GET",
  });
}
// 删除工单
export function delWorkOrder(query) {
  return request({
    url: "/business/work/remove/" + query,
    method: "GET",
  });
}
// 结束工单
export function endWorkOrder(query) {
  return request({
    url: "/business/work/end/" + query,
    method: "GET",
  });
}
// 获取工单编号
export function getBusinessWordIdApi() {
  return request({
    url: "/business/work/selectId",
    method: "GET",
  });
}